package com.edu.controller;

import com.edu.service.UserService;
import com.edu.test01.mapper.User01Mapper;
import com.edu.test02.mapper.User02Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class IndexController {

    @Autowired
    private User01Mapper user01Mapper;
    @Autowired
    private User02Mapper user02Mapper;
    @Autowired
    private UserService userService;
     @RequestMapping("/index")
    public  String index(){
        user01Mapper.insert(6,"test01","25");
        user02Mapper.insert(6,"test02","25");
        return "success";
    }
     @RequestMapping("/test")
    public String test() {
         userService.insert1And2();
       return  "test";
    }
      @RequestMapping("/test01")
        public String test01() {
           return  "test01";
        }


}
